#pragma once
#include <QtGui>

namespace XpsAssets
{
	class AssetManager;
}

namespace Xps
{
	class AssetModel;

	class AssetPool : public QSplitter
	{
		Q_OBJECT

	private:
		void initActions();
		QItemSelectionModel* selection;
		QFrame* editor;
		void contextMenuEvent(QContextMenuEvent * event );
		void generateSpecificMenu(QMenu* menu);
		QTreeView* tv;
									
	public:
		XpsAssets::AssetManager* am;
		AssetPool(XpsAssets::AssetManager* am, QWidget* parent = 0);
		~AssetPool(void);
		QList<QAction*> create_actions;
		QList<QAction*> delete_actions;
		QAction* aCreateQuestion;
		QAction* aDeleteQuestion;
		QAction* aCreateAttribute;
		QAction* aCreateResult;
		QAction* aCreateResponse;
		QAction* aAddToTree;
		QAction* aDeleteSelected;
		QAction* aCreateResponseAttribute;
		QToolBar* tb;
		AssetModel* tm;
		
	signals:
		void sAddToTree(int);

	public slots:
		void createTreeItem();
		void createResponse();
		void createResponseAttribute();
		void deleteQuestion();
		void createQuestion();
		void createAttribute();
		void createResult();	
		void deleteSelected();
	};
}